API Documentation
Program.h
1 // Program.h
3 //
5 
6 namespace nkGraphics
7 {
11  class DLL_GRAPHICS_EXPORT Program : public Resource, public nkExport::Exportable
12  {
13  public :
14 
18  Program () ;
22  virtual ~Program () ;
23 
31  bool isFromFile () const ;
35  bool isFromMemory () const ;
43  const InfiniteByteMask& getSemantics () const ;
47  unsigned int getId () const ;
51  PROGRAM_TYPE getType () const ;
56 
68  virtual void setFromMemory (const ProgramSourcesHolder& memory) ;
75  virtual void setDefines (const ProgramSourcesHolder& memory) ;
95  void setFromFiles (const nkMemory::StringView& folder) ;
108  void setId (unsigned int id) ;
181 
193  virtual bool loadFromMemory () = 0 ;
201  virtual bool tryToLoadFrom (ProgramSourcesHolder& newMemory) = 0 ;
202 
232  virtual bool load () override ;
236  virtual void unload () override ;
237 
243  virtual void exportClassToTree (nkExport::Node* rootNode) override ;
249  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
250  } ;
251 }
nkGraphics::Program::setFromFiles
void setFromFiles(const nkMemory::StringView &folder)
nkGraphics::Program
Holds all informations related to GPU programs, and manages their compilation.
Definition: Program.h:12
nkGraphics::Program::loadFromMemory
virtual bool loadFromMemory()=0
nkGraphics::Program::getId
unsigned int getId() const
nkGraphics::Program::setActivateCrossCompilerDefines
void setActivateCrossCompilerDefines(bool value)
nkGraphics::InfiniteMask
A more generic version of the InfiniteBitMask.
Definition: InfiniteMask.h:15
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkGraphics::Program::prepareMemoryWithFiles
bool prepareMemoryWithFiles()
nkGraphics::PROGRAM_TYPE
PROGRAM_TYPE
The type of programs available.
Definition: ProgramType.h:12
nkGraphics::Program::~Program
virtual ~Program()
nkGraphics::Program::unload
virtual void unload() override
nkGraphics::Program::setDefines
virtual void setDefines(const ProgramSourcesHolder &memory)
nkGraphics::Program::tryToLoadFrom
virtual bool tryToLoadFrom(ProgramSourcesHolder &newMemory)=0
nkGraphics::ProgramCompilationResult
Holds information about a complation result, from a program.
Definition: ProgramCompilationResult.h:12
nkGraphics::Program::setId
void setId(unsigned int id)
nkGraphics::Program::getType
PROGRAM_TYPE getType() const
nkGraphics::Program::getLastCompilationResult
const ProgramCompilationResult & getLastCompilationResult() const
nkGraphics::Program::setFileExtensions
void setFileExtensions(const nkMemory::StringView &value)
nkGraphics::Program::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkGraphics::Program::Program
Program()
nkGraphics::Program::isFromMemory
bool isFromMemory() const
nkGraphics::Program::exportClassToTree
virtual void exportClassToTree(nkExport::Node *rootNode) override
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkGraphics::ProgramSourcesHolder
Holds the sources of a program.
Definition: ProgramSourcesHolder.h:26
nkGraphics::Program::getSemantics
const InfiniteByteMask & getSemantics() const
nkGraphics::Program::isFromFile
bool isFromFile() const
nkGraphics::Resource
Base class for a resource in the component.
Definition: Resource.h:12
nkGraphics::Program::setFromMemory
virtual void setFromMemory(const ProgramSourcesHolder &memory)
nkGraphics::Program::load
virtual bool load() override
nkGraphics::PROGRAM_COMPILATION_PROFILE
PROGRAM_COMPILATION_PROFILE
Available program compilation profiles.
Definition: DxDefinesWrapper.h:602
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::Program::getMemory
ProgramSourcesHolder * getMemory() const
nkGraphics::Program::getProfile
PROGRAM_COMPILATION_PROFILE getProfile() const
nkGraphics::Program::setProfile
void setProfile(PROGRAM_COMPILATION_PROFILE profile)